<?php
/**
 * Enter description here ...
 * @author Micou13630
 *
 */
class ToolbarItem extends CanvasItem implements IRenderable {
	
	protected $buttonBaseStyle;
	protected $vertical;
	
	protected $buttonConstructor;
	protected $buttonProperties;
	protected $buttons;
	
	/**
	 * Constructeur
	 */
	public function ToolbarItem() {
		parent::CanvasItem(null, Constant::EDITOR_TYPE_TOOLBAR);
	}
	
	/**
	 * Implementation de object
	 * @see IRenderable::object()
	 */
	public function object() {
		return get_class($this);
	}

	/**
	 * Implementation de properties
	 * @see IRenderable::properties()
	 */
	public function properties() {
		return parent::getProp($this);
	}

	/**
	 * Implementation de scLog
	 * @see IRenderable::scLog()
	 */
	public function scLog() {
		ScCollectionLog::getInstance()->addSc(new ScLog($this->object(), get_object_vars($this)));
	}
	
	/**
	 * Implementation de render
	 * @see IScreen::render()
	 */
	public function render() {
		$this->scLog();
		return "{".$this->properties()."}";
	}
	
	/**
	 * Enter description here ...
	 * @param ToolbarButton $b
	 */
	public function addToolbarButton(ToolbarButton $b) {
		$this->buttons[] = $b;
	}
}

/**
 * Enter description here ...
 * @author Micou13630
 *
 */
class ToolbarButton extends CanvasItem implements IRenderable {
	
	protected $title;
	protected $align;
	protected $valign;
	
	protected $icon;
	protected $iconAlign;
	protected $iconHeight;
	protected $iconWidth;
	protected $iconSize;
	protected $iconOrientation;
	protected $iconSpacing;
	
	protected $radioGroup;
	
	protected $selected;
	
	protected $showDisabled;
	protected $showDisabledIcon;
	protected $showDown;
	protected $showDownIcon;
	protected $showFocused;
	protected $showFocusedIcon;
	protected $showRollOver;
	protected $showRollOverIcon;
	protected $showSelectedIcon;
	
	protected $state;
	
	protected $wrap;
	
	public function ToolbarButton() {
		parent::CanvasItem();
		
	}
	
	/**
	 * Implementation de object
	 * @see IRenderable::object()
	 */
	public function object() {
		return get_class($this);
	}

	/**
	 * Implementation de properties
	 * @see IRenderable::properties()
	 */
	public function properties() {
		return parent::getProp($this);
	}
	
	/**
	 * Implementation de scLog
	 * @see IRenderable::scLog()
	 */
	public function scLog() {
		//
	}

	/**
	 * Implementation de render
	 * @see IScreen::render()
	 */
	public function render() {
		return "{".$this->properties()."}";
	}
}
?>